private ["_aiSide", "_fobs", "_nearestFob"];

_pos = _this select 0;
_aiSide  = _this select 1;
if (_aiSide == side0)  then { _aiMakerColor = side0_MarkerColor;};
if (_aiSide == side1)  then { _aiMakerColor = side1_MarkerColor;};

_fobs = [friendlybase];

{ if ((_x select 1) AND (markerColor (_x select 2) == _aiMakerColor)) then {_fobs = _fobs + _x select 0} } forEach aiStrategicPoints;
_nearestFob = [_pos,_fobs] call fGetNearestArray;
_nearestFob